//
//  ZSAppPresenter.m
//  设计模式
//
//  Created by 赛 Sir on 2023/10/29.
//

#import "ZSAppPresenter.h"
#import "ZSView.h"
#import "ZSModel.h"

@interface ZSAppPresenter ()

@property (nonatomic, weak) UIViewController *currentVC;

@end

@implementation ZSAppPresenter

- (ZSAppPresenter *)initWith:(UIViewController *)cirrentVC {
    if(self = [super init]) {
        self.currentVC = cirrentVC;
        [self setUI];
    }
    return self;

}

- (void)setUI {
    ZSView *zsView = [[ZSView alloc] initWithFrame:CGRectMake(100, 100, 100, 100)];
    zsView.ActionBlick = ^(NSString * _Nonnull str) {
        
    };
    [self.currentVC.view addSubview:zsView];
    
    //加载数据
    ZSModel *model = [[ZSModel alloc] init];
    model.titleStr = @"你好呀";
    
    //处理UI
    zsView.nameLab.text = model.titleStr;
    
}



@end
